home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat 1994 October
/
macformat-005.iso
/
Shareware City
/
Developers
/
MacVogl-alpha1PPC
/
halloc.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
C/C++ Source or Header
|
1994-07-11
|
331 b
|
24 lines
|
[
TEXT/????
]
#include <stdio.h>
extern char *malloc();
/*
* hallocate
*
* Allocate some memory, barfing if malloc returns NULL.
*/
char *
hallocate(size)
unsigned size;
{
char *p;
if ((p = (char *)malloc(size)) == (char *)NULL) {
fprintf(stderr,"hallocate: request for %d bytes returned NULL", size);
exit(1);
}
return (p);
}